﻿CREATE PROCEDURE dbo.PriceLinesNOTParsedInsert
(
	@ContragentId int,
	@GoodsCode int,
	@GoodsName varchar(150),
	@CountryName varchar(20),
	@ManufacturerName varchar(70),
	@Price decimal(19, 2),
	@Qntty int,
	@NDSTax tinyint,
	@BatchNumber varchar(20),
	@ReadyBefore smalldatetime,
	@ReestrPrice decimal(19, 2),
	@ReestrDate smalldatetime,
	@Mandatory bit,
	@Drastic bit,
	@RetailPack int,
	@ManufactureBarCode varchar(13),
	@GNVLS bit,
	@Note varchar(250)
)
AS
	SET NOCOUNT OFF;
INSERT INTO [PR].[PriceLinesNOTParsed] ([ContragentId], [GoodsCode], [GoodsName], [CountryName], [ManufacturerName], [Price], [Qntty], [NDSTax], [BatchNumber], [ReadyBefore], [ReestrPrice], [ReestrDate], [Mandatory], [Drastic], [RetailPack], [ManufactureBarCode], [GNVLS], [Note]) VALUES (@ContragentId, @GoodsCode, @GoodsName, @CountryName, @ManufacturerName, @Price, @Qntty, @NDSTax, @BatchNumber, @ReadyBefore, @ReestrPrice, @ReestrDate, @Mandatory, @Drastic, @RetailPack, @ManufactureBarCode, @GNVLS, @Note);
	
SELECT Id, ContragentId, GoodsCode, GoodsName, CountryName, ManufacturerName, Price, Qntty, NDSTax, BatchNumber, ReadyBefore, ReestrPrice, ReestrDate, Mandatory, Drastic, RetailPack, ManufactureBarCode, GNVLS, Note FROM PR.PriceLinesNOTParsed WHERE (Id = SCOPE_IDENTITY())